Skip to content

fix(ci-status): filter nested 'review / review' own-check (#497/#469) - #531

Merged
don-petry merged 1 commit into
mainfrom
fix/own-check-nested-review
Jun 10, 2026
Merged

don-petry merged 1 commit into
mainfrom
fix/own-check-nested-review

Conversation

@don-petry

@don-petry don-petry commented Jun 10, 2026 •

Copy link
Copy Markdown
Collaborator

Second-order fix from ring-0 validation. After the self-host flip, the agent's own check appears as the nested review / review (stub → reusable), which the #469 own-check filter (bare review only) missed. A stale failed own-check therefore classified clean PRs as ci-failing, so the agent skipped its entire approval backlog and never re-reviewed.

Fix: match review / review exactly (not a / review suffix — that would wrongly filter a real external Build / review). +3 regression tests; existing external-check guard still green (35/35 bats).

After merge: cut pr-review/v1.4.0, move stable, re-validate that the agent now reviews+approves the backlog. Part of #497 · epic #495.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed CI status computation to correctly classify certain check types in the review workflow.
  • Tests

    • Added test coverage for CI status computation with various job configurations.

…ck (#497, #469)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 10, 2026 01:41
@don-petry don-petry added the initiative Epic / initiative tracking issue label Jun 10, 2026
@don-petry
don-petry requested a review from a team as a code owner June 10, 2026 01:41
@don-petry don-petry added the initiative Epic / initiative tracking issue label Jun 10, 2026
@coderabbitai

coderabbitai Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8421c2fe-79fd-46e6-b755-440e7de2b914

📥 Commits

Reviewing files that changed from the base of the PR and between bfe4ee5 and 9098edc.

📒 Files selected for processing (2)
  • scripts/lib/ci-status.sh
  • tests/test_ci_status.bats

📝 Walkthrough

Walkthrough

The PR extends the CI status filtering logic to handle the nested job name form "review / review" as an internal own-check, preventing it from affecting the CI gate status. The predicate is updated with corresponding documentation, and three new test cases validate the behavior across standalone and combined scenarios.

Changes

Own-check filtering for nested job names

Layer / File(s) Summary
Predicate logic and documentation
scripts/lib/ci-status.sh
The is_own_check jq predicate now explicitly matches ($n == "review / review") as an own-check to filter it from CI gate computation. Function comments document this additional nested job-name variant.
Test coverage for nested job filtering
tests/test_ci_status.bats
Three new test cases validate that review / review FAILURE alone and paired with external SUCCESS checks result in passing, and that it correctly fails when paired with external FAILURE checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

needs-human-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly identifies the specific problem being fixed: filtering the nested 'review / review' own-check in the CI status computation, with clear reference to related issues.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/own-check-nested-review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the CI status computation script to recognize and filter out the nested 'review / review' job name, which is generated when the cascade is invoked via a trigger stub. This prevents a stale or failed self-hosted review check from blocking subsequent reviews. Additionally, corresponding BATS tests have been added to verify this behavior and ensure that genuine external failures are still correctly identified. There are no review comments, and I have no feedback to provide.

@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CI-status classifier used by the PR Review Agent so it correctly ignores the agent’s own nested check name (review / review) that appears when invoked via the trigger stub → reusable workflow chain, preventing stale/failed self-checks from causing false ci-failing gating and skipping the approval backlog.

Changes:

  • Extend the “own-check” filter in compute_ci_status to match review / review exactly (avoids accidentally filtering external checks like Build / review).
  • Add regression tests covering review / review failure cases plus an external-failure guard.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/lib/ci-status.sh Adds an exact-match filter for review / review in the own-check exclusion logic and documents why it must be exact.
tests/test_ci_status.bats Adds 3 regression tests validating the new nested own-check filter while ensuring real external failures still gate.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
  (no actionable findings — bot comment is a "review in progress" notification;
   review has not completed and posted any thread comments)
Open threads resolved: 0  (none exist)
Tier 1 blockers: 0
Files changed: none
Skipped (informational): 0
```
No code changes or thread replies are needed. The PR is clear to proceed once the in-flight checks (CodeRabbit, SonarCloud, CodeQL analysis, `unit`) complete.

@don-petry
don-petry enabled auto-merge (squash) June 10, 2026 01:42
@don-petry
don-petry merged commit 09f416c into main Jun 10, 2026
35 of 36 checks passed
@don-petry
don-petry deleted the fix/own-check-nested-review branch June 10, 2026 01:42
don-petry added a commit that referenced this pull request Jun 12, 2026
…ck (#497, #469) (#531)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 14, 2026
…ck (#497, #469) (#531)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
…ck (#497, #469) (#531)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…ck (#497, #469) (#531)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…ck (#497, #469) (#531)

The #497 self-host flip routes pr-review via a trigger stub → reusable, so the
agent's own check appears in the rollup as the nested 'review / review' rather
than the bare 'review'. The #469 own-check filter only matched the bare name, so
a stale/failed own check now classified clean PRs as ci-failing → the agent
skipped them and never re-reviewed (it skipped the entire approval backlog).

Match 'review / review' exactly (not a '/ review' suffix, which would wrongly
filter a genuine external 'Build / review'). Adds 3 regression tests; the
existing external-check guard still passes.

Promote via pr-review/stable. Part of #497 · epic #495.

Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

initiative Epic / initiative tracking issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants